package com.makingTeam.config.disruptor;

import com.lmax.disruptor.EventHandler;
import lombok.extern.slf4j.Slf4j;

/**
 * 消费者
 * user: pzy
 * date: 2025/4/28 17:31
 */
@Slf4j
public class DisEventHandler implements EventHandler<MessageModel> {

    @Override
    public void onEvent(MessageModel messageModel, long l, boolean b) throws Exception {
        try {
            log.info("消费者处理消息开始");
            if (messageModel !=null) {
                log.info("消费者消费的信息是：{}",messageModel);
            }
        } catch (Exception e) {
            log.info("消费者处理消息失败");
        }
        log.info("消费者处理消息结束");
    }
}
